package org.jeecg.modules.fund.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

@Data
@TableName("fund_trade")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class FundTrade {
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键id")
    private String id;
    private String userId;
    private String holdId;
    private String code;
    private Integer tradeType;
    private BigDecimal tradeNum;
    private BigDecimal tradeVal;
    private BigDecimal tradeRate;
    private BigDecimal tradeMoney;
    private BigDecimal tradeCommission;
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date tradeSuccessDate;
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date tradeDate;
    private Integer tradeDateType;
    private Integer tradeStatus;
    private String tradeRemark;
    private Date createTime;
    private Date updateTime;
    /**
     * 当前总计
     */
    @TableField(exist = false)
    private BigDecimal totalNum;
    /**
     * 上个总计
     */
    @TableField(exist = false)
    private BigDecimal lastNum;
}
